from django.db import models

# Create your models here.


class Goods(models.Model):
    name = models.CharField(max_length=500, verbose_name="商品名称")
    price = models.IntegerField(null=True)
    number = models.IntegerField(default=20000)
    color = models.CharField(max_length=220)
    size = models.CharField(max_length=200)
    version = models.CharField(max_length=32)
    content = models.CharField(max_length=200,verbose_name="简介")
    detail = models.TextField(verbose_name="商品详情")
    picture = models.CharField(max_length=128,default=None,verbose_name="商品图片")



class FenLei(models.Model):
    name = models.CharField(max_length=50,verbose_name="类名")
    p_id = models.ForeignKey("self",on_delete=models.CASCADE,null=True)


class DaBiao(models.Model):
    name = models.CharField(max_length=50, verbose_name="类名")
    p_id = models.ForeignKey("self", on_delete=models.CASCADE, null=True)

